package com.csjbot.alicecontrolserver.app;

import android.app.Application;

import com.csjbot.alicecontrolserver.R;
import com.iflytek.cloud.SpeechUtility;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;

/**
 * Copyright (c) 2017, SuZhou CsjBot. All Rights Reserved.
 * www.csjbot.com
 * <p>
 * Created by 浦耀宗 at 2017/09/22 0022-16:53.
 * Email: puyz@csjbot.com
 */

public class MyApp extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        FormatStrategy formatStrategy = PrettyFormatStrategy.newBuilder()
                .tag("csjbot_mobile")   // (Optional) Global tag for every log. Default PRETTY_LOGGER
                .build();
        Logger.addLogAdapter(new AndroidLogAdapter(formatStrategy));

                /* 科大讯飞appid */
        SpeechUtility.createUtility(this, "appid=" + getString(R.string.app_id));
    }
}
